Skip to content

Unit tests for popsyn module#499

Draft
elizabethteng wants to merge 12 commits intov2.3from
et_unittest_popsyn
Draft

Unit tests for popsyn module#499
elizabethteng wants to merge 12 commits intov2.3from
et_unittest_popsyn

Conversation

@elizabethteng
Copy link
Contributor

@elizabethteng elizabethteng commented Jan 30, 2025

Priorities:

  • test_io.py
  • test_rate_calculation.py
  • test_synthetic_population.py
    • PopulationRunner
    • DFInterface
    • History
    • Oneline
    • PopulationIO (changed by Max PR)
    • Population (reworked by Max PR)
    • TransientPopulation (reworked by Max PR)
    • Rates
  • test_transient_select_funcs.py

Others:

  • test_analysis.py
  • test_binarypopulation.py
  • test_defaults.py
  • test_GRB.py
  • test_independent_sample.py fix name of binary_fraction_value to generate_binary_fraction
  • test_sample_from_file.py
  • test_selection_effects.py
  • test_star_formation_history.py

@elizabethteng elizabethteng self-assigned this Jan 30, 2025
@elizabethteng elizabethteng marked this pull request as draft January 30, 2025 15:53
@mkruckow mkruckow added the enhancement New feature or request label Feb 4, 2025
@maxbriel
Copy link
Collaborator

I've excluded get_formation_times in star_formation_history in PR #543 but this function should be tested :)

@elizabethteng elizabethteng marked this pull request as ready for review July 16, 2025 19:28
@elizabethteng elizabethteng marked this pull request as draft July 16, 2025 19:28
@elizabethteng elizabethteng changed the base branch from development to v2.1-dev July 29, 2025 22:23
@sgossage sgossage mentioned this pull request Oct 3, 2025
@elizabethteng elizabethteng changed the base branch from v2.1-dev to v2.2 October 30, 2025 14:28
@elizabethteng elizabethteng changed the base branch from v2.2 to main October 30, 2025 14:43
@elizabethteng elizabethteng changed the base branch from main to v2.2 October 30, 2025 14:43
@elizabethteng elizabethteng force-pushed the et_unittest_popsyn branch 2 times, most recently from 16d40bc to 680e078 Compare October 30, 2025 15:00
@elizabethteng
Copy link
Contributor Author

successfully fixed rebase, now I need to go back and copy over changes from v2.2 from Max's pops PR

- Add pragma: no cover tags for unreachable/untestable branches
- Add mass validation to independent_sample.py
- Fix typos (astopy→astropy, available_sensitiveies→available_sensitivities)
- Update CI workflow for popsyn test coverage
- Add unit tests for popsyn modules
- Update test_star_formation_history.py for v2.3

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@elizabethteng elizabethteng changed the base branch from v2.2 to v2.3 March 26, 2026 13:05
elizabethteng and others added 7 commits March 26, 2026 08:33
- Replace inline population file creation with make_test_pop/make_ini helpers
- Remove duplicate test_export_selection and test_calculate_formation_channels from TestRates
- Remove editing artifacts (embedded code block)
- Add multiple-metallicities error test in test_export_selection
- Expand test_calculate_formation_channels with DummyOneline mock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants